﻿using B.S.Ingredients.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace B.S.Ingredients.Infartructrue
{
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }

        public DbSet<CuitvaClass> cuitvaClasses { get; set; }

        public DbSet<EnterClass> enterClasses { get; set; }

        public DbSet<ExportClass> exportClasses { get; set; }

        public DbSet<Immunity> immunities { get; set; }

        public DbSet<Material> materials { get; set; }

        public DbSet<Processing> processings { get; set; }

        public DbSet<ProduciNameClass> produciNameClasses { get; set; }

        public DbSet<Product> products { get; set; }

        public DbSet<Slaughter> slaughters { get; set; }
        public DbSet<SlanghterBoss> SlanghterBossa { get; set; }
        public DbSet<SlanghtSheng> SlanghtShengs { get; set; }
        public DbSet<OvertimeClass> OvertimeClasss { get; set; }

        public DbSet<ImgInfor> ImgInfors { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Product>().HasQueryFilter(a => a.isDel == false);
            modelBuilder.Entity<Immunity>().HasQueryFilter(s => s.isDel == false);
        }
      


    }
}
